package com.huawei.appgallery.assistantdock.gamemode.card;

import android.content.Context;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import o.azc;
import o.beo$d;
import o.beo.f;
import o.bif.d;
import o.bif.g;
import o.bii;
import o.biq;
import o.biu;
import o.biv;
import o.ContentManager;
import o.fam;

public class DeepDndEnterCardBuoy extends BuoyBaseEnterCard {
    private g ʻ = g.CLOSE;
    private String ᐝ;

    public DeepDndEnterCardBuoy(Context context) {
        super(context);
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        this.ʻ = bii.ˋ();
        ॱ(this.ʻ);
    }

    private void ॱ(g gVar) {
        switch (gVar) {
            case MSG_DND:
                this.ˊ.setText(f.ˊᐝ);
                this.ʼ.setBackgroundResource(beo$d.ʿ);
                this.ᐝ = "STATE2";
                return;
            case DEEP_DND:
                this.ˊ.setText(f.ʻॱ);
                this.ʼ.setBackgroundResource(beo$d.ʽॱ);
                this.ᐝ = "STATE3";
                return;
            case CLOSE:
                this.ˊ.setText(f.ॱᐝ);
                this.ʼ.setBackgroundResource(beo$d.ˈ);
                this.ᐝ = "STATE1";
                return;
            default:
                return;
        }
    }

    public void ˋ() {
        this.ʻ = g.ˊ((this.ʻ.ˏ() + 1) % 3);
        ॱ(this.ʻ);
        bii.ˎ(this.ʻ);
        ͺ();
        ʻ();
        ˏ(this.ᐝ);
    }

    private void ͺ() {
        Context ॱ = azc.ॱ(ContentManager.getInstant().getContext());
        if (biu.ˋ().H_() && this.ʻ == g.MSG_DND) {
            fam.ॱ().ॱ(ॱ, new biv(ॱ));
            biu.ˋ().ˎ();
        }
        if (biu.ˋ().ʻ() && this.ʻ == g.DEEP_DND) {
            fam.ॱ().ॱ(ॱ, new biq(ॱ));
            biu.ˋ().ʽ();
        }
    }

    String ᐝ() {
        return d.GSS_GAME_DND_MODE.ˊ();
    }
}
